package com.fifth.apartment.result;

import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * TODO
 *
 * @author Dao
 * @since 2024/7/2
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("分页查询结果集")
public class PageResult<R> implements Serializable {

    private long total;

    private List<R> records;

    public PageResult(List<R> records) {
        this.records = records;
    }

    public PageResult(long total) {
        this.total = total;
    }
}
